home *** CD-ROM | disk | FTP | other *** search
- head 1.3;
- branch ;
- access ;
- symbols ;
- locks ; strict;
- comment @ * @;
-
-
- 1.3
- date 90.04.18.20.18.06; author mgbaker; state Exp;
- branches ;
- next 1.2;
-
- 1.2
- date 90.04.18.17.22.43; author mgbaker; state Exp;
- branches ;
- next 1.1;
-
- 1.1
- date 90.04.18.16.38.35; author mgbaker; state Exp;
- branches ;
- next ;
-
-
- desc
- @Original version.
- @
-
-
- 1.3
- log
- @took out print statement
- @
- text
- @/*
- * recovcmd.c --
- *
- * User interface to recovery related commands.
- *
- * Copyright (C) 1986 Regents of the University of California
- * All rights reserved.
- * Permission to use, copy, modify, and distribute this
- * software and its documentation for any purpose and without
- * fee is hereby granted, provided that the above copyright
- * notice appear in all copies. The University of California
- * makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without
- * express or implied warranty.
- */
-
- #ifndef lint
- static char rcsid[] = "$Header: /sprite/src/cmds/recovcmd/RCS/recovcmd.c,v 1.2 90/04/18 17:22:43 mgbaker Exp Locker: mgbaker $ SPRITE (Berkeley)";
- #endif not lint
-
- #include "sprite.h"
- #include "status.h"
- #include "option.h"
- #include "stdio.h"
- #include "sysStats.h"
-
- /*
- * Command line options.
- */
-
- int recovAbsolutePings = -1;
- int recovStats = -1;
- int printLevel = -1;
-
- Option optionArray[] = {
- {OPT_TRUE, "abson", (Address) &recovAbsolutePings,
- "\tMake recovery ping interval absolute."},
- {OPT_FALSE, "absoff", (Address) &recovAbsolutePings,
- "\tMake recovery ping interval relative to when it finishes pinging."},
- {OPT_TRUE, "recovStats", (Address) &recovStats,
- "\tPrint out recovery statistics."},
- {OPT_INT, "printLevel", (Address) &printLevel,
- "\tSet recov trace print level (0=off, 1=default, 10=highest)."},
- };
- int numOptions = sizeof(optionArray) / sizeof(Option);
-
-
- /*
- *----------------------------------------------------------------------
- *
- * main --
- *
- * Collects arguments and branches to the code for the command.
- *
- * Results:
- * None.
- *
- * Side effects:
- * Calls the command.
- *
- *----------------------------------------------------------------------
- */
- main(argc, argv)
- int argc;
- char *argv[];
- {
- register ReturnStatus status = SUCCESS; /* status of system calls */
-
- argc = Opt_Parse(argc, argv, optionArray, numOptions);
-
- /*
- * Set various recov system flags.
- */
- if (recovAbsolutePings != -1) {
- status = Sys_Stats(SYS_RECOV_ABS_PINGS, recovAbsolutePings, NIL);
- }
- if (printLevel != -1) {
- status = Sys_Stats(SYS_RECOV_PRINT, printLevel, NIL);
- }
- #ifdef NOTDEF
- if (recovStats != -1) {
- Recov_Stats stats;
-
- status = Sys_Stats(SYS_RECOV_STATS, sizeof (Recov_Stats), &stats)
- if (status != SUCCESS) {
- fprintf(stderr, "Recov stats failed: error %x.\n", status)
- } else {
- fprintf(stderr,
- "Haven't figured out what to do about this option yet.\n");
- }
- }
- #endif NOTDEF
- exit(status);
- }
- @
-
-
- 1.2
- log
- @Added more hooks
- @
- text
- @d18 1
- a18 1
- static char rcsid[] = "$Header: /sprite/src/cmds/recovcmd/RCS/recovcmd.c,v 1.1 90/04/18 16:38:35 mgbaker Exp Locker: mgbaker $ SPRITE (Berkeley)";
- a77 1
- printf("printLevel is %d\n", printLevel);
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d18 1
- a18 1
- static char rcsid[] = "$Header: /sprite/src/cmds/rpccmd/RCS/rpccmd.c,v 1.3 89/08/15 21:11:45 jhh Exp Locker: mgbaker $ SPRITE (Berkeley)";
- d33 1
- d42 2
- d77 5
- d93 1
- @
-